<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>单页内容修改</title>
<link rel="stylesheet" type="text/css" href="template/admin.css"/>
<script type="text/javascript" src="template/images/jquery.js"></script>
<script type="text/javascript" src="template/images/form.js"></script>
<style type="text/css">
body{margin:20px;}
</style>
<script type="text/javascript">
$(document).ready(function(){
	$('#ex').click(function(){
		$expt=$(this).find('#expt');
		$val=$expt.text();
		if($val=='展开'){
			$('#tb2').show();
			$expt.text('收起');
		}else{
			$('#tb2').hide();
			$expt.text('展开');
		}
	});
	
});

function ck_show_url(n,id){
	$ck=$(n).attr('checked');
	if($ck){
		$(id).show();
	}else{
		$(id).hide();
	}
}

</script>
</head>

<body>
<div class="div_out">
 <div class="position"><h2>当前位置 > <a href="?action=content_list&lang=<?php echo $lang;?>">内容管理</a> > <a href="#">修改单页内容</a></h2></div>

</div><!--导航-->
 

<div id="sys">
<form name="maininfo" method="post" action="?" class="form" enctype="multipart/form-data">
<div class="div_out" id="tb">
 <table cellpadding="0" cellspacing="0" width="100%">
 	<thead>
		<tr><th style="width:20%">参数说明</th><th style="width:80%">参数值</th></tr>
	</thead>
	<tbody>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">标题：</td><td style="width:80%"><input name="title" title="标题" class="is_empty" value="<?php echo $field_value['title'];?>" style="width:50%" /></td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">来源：<p style="color:#999999; font-weight:normal"></p></td><td style="width:80%"><input name="source" value="<?php echo $field_value['source'];?>" style="width:30%" /></td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">作者：<p style="color:#999999; font-weight:normal"></p></td><td style="width:80%"><input name="author" value="<?php echo $field_value['author'];?>" style="width:30%" /></td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">缩略图：</td><td style="width:80%"><input name="thumb" value="<?php echo $field_value['tbpic'];?>" style="width:30%" id="thumb" /><input style="margin-left:5px;" type="button" value="上传图片" name="button" onclick="window.open('admin_pic_upload.php?type=radio&get=thumb','图片上传','width=800,height=800',resizable='yes');"/><span id="show_thumb"><?php if($field_value['tbpic']){?><a href="../upload/<?php echo $field_value['tbpic'];?>"><img src="../upload/<?php echo $field_value['tbpic'];?>" style="border:1px solid #ccc;"  height="50" width="50"/></a><?php }?></span></td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1"><span title="请选择发布栏目,使用频道模板的栏目不可发布" class="help">发布栏目：</span></td><td style="width:80%">
		   <?php
		 	echo $cate_name;
		 ?>
		  </td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">页面关键字(SEO)：</td><td style="width:80%"><input name="key_words" value="<?php echo $field_value['keywords'];?>" style="width:50%" />使用,分割</td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1">页面描述(SEO)：<p style="color:#999999; font-weight:normal"></p></td><td style="width:80%"><textarea name="info" style="width:50%; height:50px;"><?php echo $field_value['info'];?></textarea><input name="is_info" type="checkbox" style="margin:0 5px;" value="1"  checked="checked"/>提取一部分内容作为描述</td>
		</tr>
		<tr>
		  <td style="width:20%;text-align:center" class="w1"><span title="使用html编辑器时才能使用该功能" class="help"></span>html编辑器选项:</td><td style="width:80%"><input name="down_file" type="checkbox" style="margin:0 5px;border:0" value="1"  checked="checked"/>下载网络图片<input name="first_pic" type="checkbox" style="margin:0 5px;border:0" value="1"  checked="checked"/>使用第一张图片作为缩略图<input name="pic_watermark" type="checkbox" style="margin:0 5px;border:0" value="1"  checked="checked"/>图片是否加水印</td>
		</tr>
		
		
		<?php
		echo content_fields($channel_id,$field_value,'true');
		?>
		
		<tr>
		  <td class="w1" style="border:0; background:#CAE9FF; cursor:pointer; width:20%; border-top:1px solid #7CC6F9" id="ex">高级配置:[<span id="expt">展开</span>]</td><td style="width:80%;border:0; background:#CAE9FF; border-top:1px solid #7CC6F9"></td>
		</tr>
	</tbody>
	<tbody id="tb2" style="display:none">
		<tr>
		  <td class="w1" style="width:20%;text-align:center">置顶:</td><td style="width:80%"><select name="top">
		  <option value="0" <?php if($field_value['top']==0){?>selected="selected"<?php }?>>默认置顶</option>
		  <option value="1" <?php if($field_value['top']==1){?>selected="selected"<?php }?>>置顶三天</option>
		  <option value="2" <?php if($field_value['top']==2){?>selected="selected"<?php }?>>置顶一周</option>
		  <option value="3" <?php if($field_value['top']==3){?>selected="selected"<?php }?>>置顶一个月</option>
		  <option value="4" <?php if($field_value['top']==4){?>selected="selected"<?php }?>>置顶三个月</option>
		  <option value="5" <?php if($field_value['top']==5){?>selected="selected"<?php }?>>置顶半年</option>
		  </select></td>
		</tr>
		<tr>
		  <td class="w1" style="width:20%;text-align:center">阅读权限:</td><td style="width:80%">
		  <select name="purview">
		   <option value="0" <?php if($field_value['purview']==0){?>selected="selected"<?php }?>>开放浏览</option>
		  <?php
		  $cache_rel=read_cache(DATA_PATH."cache/cache_member_group.php",'member_group');
		  if(!empty($cache_rel)){
			foreach($cache_rel as $k=>$v){
		  ?>
		  <option <?php if($field_value['purview']==$v['id']){?>selected="selected"<?php }?> value="<?php echo $v['id'];?>"><?php echo $v['member_group_name'];?></option>
		  <?php
		  }
		  }
		  ?>
		  </select>
		 </td>
		</tr>
		<tr>
		  <td class="w1" style="width:20%;text-align:center">发布时间:</td><td style="width:80%"><input style="width:30%" value="<?php echo date('Y-m-d H:m:s',time());?>" name="addtime" /></td>
		</tr>
		<tr>
		  <td class="w1" style="width:20%;text-align:center">生成设置:</td><td style="width:80%"><input type="radio" value="0" name="is_html" style="margin:0 5px;border:0" <?php if(!$_confing['web_html'][0]){echo "disabled=\"disabled\" checked=\"checked\"";}elseif(!$field_value['is_html']){ echo"checked=\"checked\"";}?> />生成html<input type="radio" value="1" name="is_html" style="margin:0 5px;border:0" <?php if(!$_confing['web_html'][0]){echo "disabled=\"disabled\"";}elseif($field_value['is_html']){ echo"checked=\"checked\"";}?> />动态浏览&nbsp;&nbsp;<?php if(!$_confing['web_html'][0]){echo "<span style=\"color:red\">需要生成html请到'站点设置'中开启该语言的'生成html'功能</span>";}else{}?></td>
		</tr>
		<tr>
		  <td class="w1" style="width:20%;text-align:center">缓存时间:</td><td style="width:80%"><input type="text" name="cache_time" style="width:100px" <?php if(!$_confing['is_cache'][0]){echo 'disabled="disabled"';}?> value="<?php if($field_value['cache_time']){echo $field_value['cache_time'];}else{echo $_confing['cache_time'];}?>" />秒<span style="color:#FF0000">只能动态页面使用</span></td>
		</tr>
		</tbody>
 </table>
 </div>
 <div class="btn" style="margin-top:10px">
<input type="hidden" name="action" value="save_edit_content"/><input type="hidden" value="<?php echo $id;?>" name="id" /><input type="hidden" name="channel_id" value="<?php echo $channel_id;?>" /><input name="lang" value="<?php echo $lang;?>"  type="hidden"/><input type="hidden" value="<?php echo $field_value['category'];?>" name="cate_id" />
  <input type="submit" value="确定" name="submit" class="go"/><input type="reset" style="margin:0 10px;" class="go" value="重置" name="reset"/>
 </div>
</form>
</div><!--内容切换-->



</body>
</html>
